package org.wzy.design.patterns.prototype.greatestage;

import java.io.Serializable;

// 金箍棒
public class GoldRingStaff implements Serializable {

	private static final long serialVersionUID = 9090876784608685904L;

	private float height = 100; // 长度

	private float diameter = 10; // 直径

	/**
	 * 金箍棒变大
	 */
	public void grow() {
		this.height *= 2;
		this.diameter *= 2;
	}

	/**
	 * 金箍棒缩小
	 */
	public void shrink() {
		this.height /= 2;
		this.diameter /= 2;
	}

	public float getHeight() {
		return height;
	}

	public void setHeight(float height) {
		this.height = height;
	}

	public float getDiameter() {
		return diameter;
	}

	public void setDiameter(float diameter) {
		this.diameter = diameter;
	}
}
